﻿@model zhangmenren.Models.UserEntity
<header class="mui-bar mui-bar-nav user-bar-nav" style="box-shadow: none!important;border-bottom: 0px;">
	<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
	<h1 class="mui-title">个人中心</h1>
</header>

<div class="mui-content bg-gray">
	<!---->
	<ul class="mui-table-view user-list">
		<li class="mui-table-view-cell mui-media user-header-box">
			<img src="/images/user-header-bg.jpg" alt="" class="user-header-bg" />
			<a class="mui-navigate-right" style="z-index: 2;" href='@Url.Action("Index","MyInfo",new{id=Model.Id})'>
				<div class="mui-media-object mui-pull-left">
					<img src="@Model.Head">
				</div>
				<div class="mui-media-body">
					<h5>@Model.UserName</h5>
					@if (Model.ZMRID > 0)
					{
						<p>掌门号：@Model.ZMRID</p>
					}


				</div>
				<p class="user-text-qm">
					个性签名：@(string.IsNullOrEmpty(Model.Signature)?"这家伙很懒!": Model.Signature)
				</p>
			</a>
		</li>
	</ul>
	<div class="user-info-content">
		<div class="user-info-item">
			<p>@ViewBag.ShouChang</p>
			<p>收藏</p>
		</div>
		<div class="user-info-item">
			<p>@ViewBag.DianZhan</p>
			<p>点赞</p>
		</div>
		<div class="user-info-item">
			<p>@ViewBag.GuanZhu</p>
			<p>关注</p>
		</div>
	</div>
    <ul class="mui-table-view user-list user-list-group">

        @if (Model.ZMRID > 0)
    {
        <li class="mui-table-view-cell">
            <a class="mui-navigate-right user-icon user-icon1" href='@Url.Action("MyWrok",new{id=Model.Id})'>
                我的作品
                <span class="mui-badge mui-badge-inverted"><b>文档（@ViewBag.WenDang）</b>|<b>视频（@ViewBag.ShiPin）</b></span>
            </a>
        </li>
}


        <li class="mui-table-view-cell link-href">
            <a class="mui-navigate-right user-icon user-icon2" href='@Url.Action("MyWorks")'>
                我的课程
                <span class="mui-badge mui-badge-inverted"><b>购买（@ViewBag.GouMai）</b>@Html.Raw(Model.ZMRID > 0 ? "|<b>出售（" + 0 + "）</b>" : "")</span>
            </a>
        </li>

        @if (Model.ZMRID == 0)
    {
        <li class="mui-table-view-cell link-href">
            <a class="mui-navigate-right user-icon user-icon3" href='@Url.Action("Index","Apply",new{id=Model.Id})'>
                申请地信掌门人
            </a>
        </li>
}

        @if (ViewBag.RenZheng == -1)
    {
        <li class="mui-table-view-cell link-href">
            <a class="mui-navigate-right user-icon user-icon4" href='@Url.Action("RenZheng","Apply",new{id=Model.Id})'>
                实名认证
                <span class="mui-badge mui-badge-inverted">未认证</span>
            </a>
        </li>
}
else if (ViewBag.RenZheng == 0)
{
    <li class="mui-table-view-cell link-href">
        <a class="mui-navigate-right user-icon user-icon4" href='javascript:;'>
            实名认证
            <span class="mui-badge mui-badge-inverted">等待审核</span>
        </a>
    </li>
}
else if (ViewBag.RenZheng == 1)
{
    <li class="mui-table-view-cell link-href">
        <a class="mui-navigate-right user-icon user-icon4" href='@Url.Action("RenZhengSuccess","Apply")'>
            实名认证
            <span class="mui-badge mui-badge-inverted">认证成功</span>
        </a>
    </li>
}

        @if (Model.ZMRID == 0)
    {
        <li class="mui-table-view-cell">
            <a class="mui-navigate-right user-icon user-icon5" href="service.html">
                我的收入
                <span class="mui-badge mui-badge-inverted">￥0.00</span>
            </a>
        </li>
}

        <li class="mui-table-view-cell link-href">
            <a class="mui-navigate-right user-icon user-icon6" href='@Url.Action("About","Home")'>
                关于掌门人
            </a>
        </li>

        <li class="mui-table-view-cell link-href">
            <a class="mui-navigate-right user-icon user-icon6" href='javascript:;' onclick="tuiciu()">
                退出
            </a>
        </li>

    </ul>
	<!---->
</div>
@{
	await Html.RenderPartialAsync("_Menu", 2);
}
@section Scripts{
<script>


    function tuiciu(){
    $.ajax({
    type:"post",
    url:'@Url.Action("DelCookie")',
    success:function(){
    location.href="/Login/Index";
    }
    })
    }
</script>
}